import React from 'react'
import List from './List'
import './home.scss'
import { NavBar, Space, Toast, SearchBar } from 'antd-mobile'
import { SearchBarRef  } from 'antd-mobile-icons'
import { useNavigate } from 'react-router-dom'
export default function Home() {
  let navigate = useNavigate()

  return (
    <div className='home-Index'>
            <div className='searchbox'>
              <span className='text' onClick={() => navigate('/address')} >地址</span>
                <div className='search' onClick={() => navigate('/search') }>
                    <span>请输入搜索关键字</span>
                </div>
                <span className='text' onClick={() => navigate(localStorage.getItem('token')?'/my' : '/login') }>{localStorage.getItem('token')?'我的' : '登录'}</span>
            </div>
       <List></List>
    </div>
  )
}
